package com.utils.exception;

public class BusinessException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    /**
     * 异常代码
     */
    private int code;

    /**
     * 异常消息
     */
    private String message;

    public BusinessException(String message) {
        this(0, message);
    }

    public BusinessException(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
